<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('排班总览')" />
    </head>
    <body class="febs-container" id="febs-baseAreaScheduling" >
        <div class="febs-body layui-fluid" lay-title="排班总览">
            <div class="febs-body-search">
                <form class="layui-form layui-table-form" lay-filter="baseAreaScheduling-table-form" id="baseAreaScheduling-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline" id="baseArea-tenant" th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline" >
                                        <select name="tenantId" id="tenantId" lay-search="" >
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${tenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">区域名称</label>
                                    <div class="layui-input-inline" >
                                        <select name="areaId" id="areaId" lay-search="">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">日期范围</label>
                                    <div class="layui-inline" id="laydate-range">
                                        <div class="layui-input-inline">
                                            <input type="text" name="startDate" autocomplete="off" id="start-date" lay-verify="date|required"
                                                   class="layui-input" placeholder="开始日期">
                                        </div>
                                        <div class="layui-form-mid">-</div>
                                        <div class="layui-input-inline">
                                            <input type="text" name="endDate" autocomplete="off" id="end-date" lay-verify="date|required"
                                                   class="layui-input" placeholder="结束日期">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
             </div>
            <div class="febs-table-full">
                <table lay-filter="baseAreaSchedulingTable" lay-data="{id: 'baseAreaSchedulingTable'}"></table>
            </div>
        </div>
        <th:block th:include="include::foot" />
        <script type="text/html" id="baseAreaScheduling-toolbar">
            <div lay-event="addWork" class="layui-btn layui-btn-sm " shiro:hasPermission="baseArea:add">
                <em class="layui-icon">&#xe654;</em> 新增排班
            </div>
            <div lay-event="scheduleImport" class="layui-btn layui-btn-sm " shiro:hasPermission="baseArea:export">
                <em class="layui-icon">&#xe7aa;</em> 排班导入
            </div>
            <div lay-event="scheduleExport" class="layui-btn layui-btn-sm " shiro:hasPermission="baseArea:export">
                <em class="layui-icon">&#xe82a;</em> 导入模板下载
            </div>
        </script>
        <script type="text/html" id="are-option">
            <span shiro:lacksPermission="baseArea:edit,baseArea:delete">
        <span class="layui-badge-dot febs-bg-orange"></span> 无权限
        </span>
            <a lay-event="editWork" shiro:hasPermission="baseArea:edit"><em class="layui-icon febs-edit-area febs-blue">&#xe7a4;</em>编辑排班</a>
        </script>
        <script th:src="@{/febs/js/base/baseAreaScheduling/baseAreaSchedulingList.js(v=1)}"></script>
    </body>
</html>
